home *** CD-ROM | disk | FTP | other *** search
- /********************************************************* DEFINITION
- DATE: 9/23/93
- AUTHOR: Eric R. Rosé
-
- CLASS: CPPControl
-
- SUPERCLASS: CPPVisualObject
-
- This C++ class provides an abstract superclass for a
- generic control
-
- ********************************************************************/
-
- #pragma once
-
- #include <CPPVisualObject.h>
-
-
- class CPPControl : public CPPVisualObject {
- public:
- CPPControl (CPPWindow *itsWindow, short ResID,
- Boolean isFramed = FALSE,
- Boolean canBeTarget = FALSE,
- Boolean active = FALSE, Boolean visible = TRUE);
- CPPControl (CPPWindow *itsWindow, Rect *itsBounds,
- short ControlType, StringPtr itsText,
- Boolean isFramed = FALSE,
- Boolean useWindowFont = FALSE,
- Boolean canBeTarget = FALSE,
- Boolean active = FALSE, Boolean visible = TRUE);
- ~CPPControl (void);
-
- virtual char *ClassName (void);
-
- virtual Boolean DoClick (EventRecord *theEvent);
-
- virtual void Activate (Boolean nowActive);
- virtual void MakeVisible (Boolean nowVisible);
- virtual void Draw (void);
-
- virtual void SetValue (short newValue);
- short GetValue (void);
- void SetCallBack (ProcPtr callBack);
-
- Boolean IsEnabled(void);
- virtual void DoOnClick (void);
- virtual void FrameControl (Boolean useRoundRect);
- virtual void EnableControl (Boolean nowEnabled);
-
- virtual Rect *GetBounds (void);
-
- protected:
- Boolean isEnabled;
- Boolean hasFrame;
- short myValue;
- ControlHandle theControl;
- ProcPtr callBackProc;
-
- virtual void MoveContent (short newH, short newV);
- virtual void ResizeContent (short newWidth, short newHeight);
-
- };
-
-